package com.ruoyi.report.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * Return Overrides Report 数据表，存储 Walmart 平台的退货覆盖信息
 * @TableName walmart_return_overrides_report
 */
@TableName(value ="walmart_return_overrides_report")
@Data
public class WalmartReturnOverridesReport implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)  // 设置主键和主键策略
    private Long id;
    /**
     * 商品的 SKU（库存单位）
     */
    @TableField(value = "sku")
    private String sku;

    /**
     * 是否保留商品（值: Yes/No等）
     */
    @TableField(value = "keep_it")
    private String keepIt;

    /**
     * 商品是否被限制退货（值: Yes/No等）
     */
    @TableField(value = "return_restricted")
    private String returnRestricted;

    /**
     * 限制退货的原因
     */
    @TableField(value = "restriction_reason")
    private String restrictionReason;

    /**
     * 退货中心的别名
     */
    @TableField(value = "return_center_alias")
    private String returnCenterAlias;

    /**
     * 发布状态（如：Active，Inactive等）
     */
    @TableField(value = "publish_status")
    private String publishStatus;

    /**
     * 唯一请求id
     */
    @TableField(value = "request_id")
    private String requestId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WalmartReturnOverridesReport other = (WalmartReturnOverridesReport) that;
        return (this.getSku() == null ? other.getSku() == null : this.getSku().equals(other.getSku()))
            && (this.getKeepIt() == null ? other.getKeepIt() == null : this.getKeepIt().equals(other.getKeepIt()))
            && (this.getReturnRestricted() == null ? other.getReturnRestricted() == null : this.getReturnRestricted().equals(other.getReturnRestricted()))
            && (this.getRestrictionReason() == null ? other.getRestrictionReason() == null : this.getRestrictionReason().equals(other.getRestrictionReason()))
            && (this.getReturnCenterAlias() == null ? other.getReturnCenterAlias() == null : this.getReturnCenterAlias().equals(other.getReturnCenterAlias()))
            && (this.getPublishStatus() == null ? other.getPublishStatus() == null : this.getPublishStatus().equals(other.getPublishStatus()))
            && (this.getRequestId() == null ? other.getRequestId() == null : this.getRequestId().equals(other.getRequestId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getSku() == null) ? 0 : getSku().hashCode());
        result = prime * result + ((getKeepIt() == null) ? 0 : getKeepIt().hashCode());
        result = prime * result + ((getReturnRestricted() == null) ? 0 : getReturnRestricted().hashCode());
        result = prime * result + ((getRestrictionReason() == null) ? 0 : getRestrictionReason().hashCode());
        result = prime * result + ((getReturnCenterAlias() == null) ? 0 : getReturnCenterAlias().hashCode());
        result = prime * result + ((getPublishStatus() == null) ? 0 : getPublishStatus().hashCode());
        result = prime * result + ((getRequestId() == null) ? 0 : getRequestId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", sku=").append(sku);
        sb.append(", keepIt=").append(keepIt);
        sb.append(", returnRestricted=").append(returnRestricted);
        sb.append(", restrictionReason=").append(restrictionReason);
        sb.append(", returnCenterAlias=").append(returnCenterAlias);
        sb.append(", publishStatus=").append(publishStatus);
        sb.append(", requestId=").append(requestId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}